<template>
  <div class="sonb">
    <p>{{ $store.state.msg }}</p>
    <button @click="btnClick">我要修改sona数据</button>
    我是sonb组件
  </div>
</template>
<script>
export default {
  methods: {
    btnClick () {
      this.$store.state.msga = Date.now()
    }
  }
}
</script>
<style>
.sonb {
  width: 500px;
  height: 250px;
  border: 5px solid red;
}
</style>
